<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link href="<%=path%>/CSS/style.css" rel="stylesheet" type="text/css"/>
    <script language="JavaScript" src="<%=path%>/easyUI1.4.1/jquery-1.8.2.js"></script>
    <script type="text/javascript">
        //IE不支持console对象，此代码仅为测试使用
        ///////////////////////////////////////
        window.console = window.console || (function () {
            var c = {};
            c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
                = c.clear = c.exception = c.trace = c.assert = function () {
            };
            return c;
        })();
        $(document).ready(function () {
            //返回首页
            $('#backIndex_id').click(function () {
                window.parent.frames["rightFrame"].location.href = "<%=path%>/DrivingSys/right.action?index=1";
            });
            $('#loginOut_id').click(function () {
                window.parent.location.href = "<%=path%>/DrivingSys/loginout.action";
            })
            $('#message_ids').click(function () {
                var li = $(this).find('li');
                var menuId = $(li).attr('mid');
                var url = $(li).attr('funurl');
                var title = $(this).find('label').html();
                self.parent.frames['rightFrame'].goToMessage(menuId, title, url)
            })
            $("#message_id").click(function () {
                var li = $(this).find('li');
                var menuId = $(li).attr('mid');
                var url = $(li).attr('funurl');
                var title = $(this).find('label').html();
                self.parent.frames['rightFrame'].goToMessage(menuId, title, url)
            })
        });

        $(function () {
            //顶部导航切换
            $(".nav li a").click(function () {
                $(".nav li a.selected").removeClass("selected")
                $(this).addClass("selected");
            });
            if (${hasMessage}) {
                setTimeout(function () {
                    window.parent.frames["rightFrame"].showMessageAlert();
                }, 1000);
            }
        });

        /**
         *
         * @param flag 用于判别是否弹窗提示
         */
        function top_setMessage_Flag(flag) {
            $.ajax({
                url: '<%=path%>/DrivingSys/top/getmessage.action',
                type: "post",
                dataType: "json",
                data: {},
                success: function (json) {
                    if (json) {
                        $("#message_flag_img_id").removeClass('topHide');
                        if (flag) {
                            setTimeout(function () {
                                window.parent.frames["rightFrame"].showMessageAlert();
                            }, 1000);
                        }
                    }
                    else {
                        $("#message_flag_img_id").addClass('topHide');
                    }

                }, error: function () {
                }
            })
        }
    </script>

    <style type="text/css">
        .admin {
            float: right;
            width: 100px;
            height: 80px;
            text-align: right;
            line-height: 80px;
            color: #fff;
            padding-right: 40px
        }

        .topHide {
            display: none
        }
    </style>

</head>

<body style="background:url(<%=path%>/images/index/logo.png) repeat-x;height:80px;">


<div class="tab-content">
    <div class="tab-pane active" id="bTabs_navTabsMainPage">
        <div class="well menuSideBar" style="padding: 0px 0px;">
            <div class="admin" style="padding-right: 100px">
                <%-- <span>${sessionScope.admin} &nbsp;<a href="<%=path%>/index.jsp" target="_parent">退出</a></span> --%>
                <!-- <i>消息</i>
                <b>5</b> -->
                <ul id="loginOut_id">
                    <li style="text-align: left;height: 80px;font-size: 14px;cursor:pointer;">
                        <img width="15px" height="13px" src="<%=path%>/images/index/tcxt.png">&nbsp;退出系统
                    </li>
                </ul>
            </div>
            <div class="admin" style="padding-right: 10px">
                <%-- <span>${sessionScope.admin} &nbsp;<a href="<%=path%>/index.jsp" target="_parent">退出</a></span> --%>
                <!-- <i>消息</i>
                <b>5</b> -->
                <ul id="message_ids" class="menuSideBar">
                    <li mid="tab1002" funurl="<%=path%>/DrivingSys/user/toSetPassword.action"
                        style="text-align: left;height: 80px;font-size: 14px;cursor:pointer;">
                        <img style="margin-top: 33px;" width="15px" height="14px" src="<%=path%>/images/index/xgmm.png">
                        <label style="float: right;padding-right: 14px;font-size: 14px">修改密码</label>
                    </li>
                </ul>
            </div>
            <div class="admin" style="padding-right: 10px">
                <%-- <span>${sessionScope.admin} &nbsp;<a href="<%=path%>/index.jsp" target="_parent">退出</a></span> --%>
                <!-- <i>消息</i>
                <b>5</b> -->
                <ul id="backIndex_id">
                    <li style="text-align: left;height: 80px;font-size: 14px;cursor:pointer;">
                        <img width="15px" height="14px" src="<%=path%>/images/index/home.jpg">&nbsp;返回首页
                    </li>
                </ul>
            </div>
            <div class="admin" style="padding-right: 10px">
                <%-- <span>${sessionScope.admin} &nbsp;<a href="<%=path%>/index.jsp" target="_parent">退出</a></span> --%>
                <!-- <i>消息</i>
                <b>5</b> -->
                <ul id="message_id" class="menuSideBar">
                    <li mid="tab1001" funurl="<%=path%>/DrivingSys/item/page.action"
                        style="text-align: left;height: 80px;font-size: 14px;cursor:pointer;">
                        <img style="margin-top: 33px;"  width="15px" height="14px" src="<%=path%>/images/index/message.png">

                        <img width="5px" id="message_flag_img_id" class="${(hasMessage == 'true')?'':'topHide'}"
                             style="margin-bottom: 10px"
                             src="<%=path%>/images/index/dian.png">
                        <label style="float: right;padding-right: 14px;font-size: 14px">消息中心</label>
                    </li>
                </ul>
            </div>
            <div class="admin">
                <%-- <span>${sessionScope.admin} &nbsp;<a href="<%=path%>/index.jsp" target="_parent">退出</a></span> --%>
                <!-- <i>消息</i>
                <b>5</b> -->
                <ul>
                    <li>
    	 <span style="font-size: 14px;">
    	      欢迎您，${name }
    	 </span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

</body>
</html>